﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeBehind="wfUsers.aspx.cs" Inherits="ownx.wfUsers" %>

<%@ Register Assembly="CustomControls" Namespace="CustomControls.Grid" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Felhasználók</title>
    <link href="ownx.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="js_scripts.js"></script>

    <script type="text/javascript">
        function GridView_selectRow(row, EmailID) {
            var hdn = document.form1.obj_id;
           
            //document.getElementById("gvUser").selectedIndex = 2;
            //document.getElementById("gvUser").attributes.setAttribute("selectedindex", "2");
            alert(document.getElementById("gvUser").selectedIndex);
            hdn.value = EmailID;

            if (lastRowSelected != row) {
                if (lastRowSelected != null) {
                    lastRowSelected.style.backgroundColor = originalColor;
                    lastRowSelected.style.color = 'E2DED6'
                }
                originalColor = row.style.backgroundColor
                row.style.backgroundColor = '333333'
                row.style.color = 'E2DED6'
                lastRowSelected = row;
            }
            
        }
    </script>

</head>
<body style="background-image: url(./images/bg.png); color: White; font-weight: bold;">
    <form id="form1" runat="server">
    <input id="obj_id" type="hidden" value="0" runat="server" name="obj_id" />
    <asp:Button ID="FalseButton" runat="server" Style="height: 0px; width: 0px; background-color: #111111;
        border-width: 0px;" Enabled="false" />
    <div style="width: 100%; height: 0px; position: absolute; left: 0px; top: 50%;" id="v_center">
        <div style="width: 100%; height: 600px; position: absolute; top: -300px; text-align: center;
            background-image: url(./images/alpha_bg.png); background-repeat: no-repeat; background-position: right;"
            id="dark">
            <div style="width: 950px; height: 600px; position: relative; margin: 0px auto 0px auto;">
                <div style="width: 170px; height: 600px; float: right; line-height: 5px;" id="buttons">
                    <asp:Button ID="bUj" runat="server" Text="Új" Style="margin-top: 5px;" CssClass="button"
                        OnClick="bUj_Click" />
                    <br />
                    <br />
                    <asp:Button ID="bRights" runat="server" Text="Szerkesztés" Style="" CssClass="button" OnClick="bRights_Click" />
                    <br />
                    <br />
                    <asp:Button ID="bUnlock" runat="server" Text="Unlock" Style="" CssClass="button"
                        OnClick="bUnlock_Click" Visible="False" />
                    <br />
                    <br />
                    <asp:Button ID="bSave" runat="server" Text="Mentés" Style="" CssClass="button" 
                        OnClick="bSave_Click" Visible="False" />
                    <br />
                    <br />
                    <asp:Button ID="bCancel" runat="server" Text="Mégsem" Style="" CssClass="button"
                        OnClick="bCancel_Click" Visible="False" />
                    <br />
                    <br />
                    <asp:Button ID="bDelete" runat="server" Text="Aktív/Inaktív" Style="" CssClass="button"
                        OnClick="bDelete_Click" />
                    <br />
                    <br />
                    <asp:Button ID="bVissza" runat="server" Text="Vissza" Style="" CssClass="button"
                        OnClick="bVissza_Click" />
                </div>
                <div style="width: 780px; height: 520px; float: left; text-align: left;" id="main1">
                    <div style="text-align: center;">
                        <div style="height: 250px; width: 767px; overflow: auto; margin: 5px auto 0px auto;">
                            <asp:GridView ID="gvUser" runat="server" Style="width: 750px; border-color: #dac6a6;
                                text-align: center; overflow: auto;" AutoGenerateColumns="False" CellPadding="4"
                                BorderStyle="None" CaptionAlign="Top" MouseOverColor="Black" GridLines="None"
                                PageSize="7" OnRowDataBound="gvUser_RowDataBound" 
                                OnSelectedIndexChanged="gvUser_SelectedIndexChanged" DataKeyNames="USR_ID" 
                                AllowSorting="True">
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <RowStyle VerticalAlign="Top" BorderWidth="0px" Wrap="True" />
                                <Columns>
                                    <asp:CommandField SelectText="Választ" ShowSelectButton="True" Visible="False" />
                                    <asp:BoundField DataField="USR_ID" HeaderText="Azonosító" />
                                    <asp:BoundField DataField="USR_NAME" HeaderText="Név" ReadOnly="True"></asp:BoundField>
                                    <asp:BoundField DataField="USR_LOGIN_NAME" HeaderText="Login" />
                                    <asp:BoundField DataField="USR_PW" HeaderText="PW" Visible="False" />
                                    <asp:BoundField DataField="USR_FONOK" HeaderText="USR_FONOK" Visible="False" />
                                    <asp:BoundField DataField="USR_SUPERVISOR" HeaderText="Supervisor" Visible="False" />
                                    <asp:BoundField DataField="SUPERVISOR" HeaderText="Supervisor">
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="FONOK_NAME" HeaderText="Főnök" />
                                    <asp:BoundField DataField="AKTIV" HeaderText="Aktív" ReadOnly="True" />
                                </Columns>
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Justify" 
                                    BorderStyle="None" />
                                <HeaderStyle BackColor="Black" Font-Bold="True" Height="30px" CssClass="header" />
                                <SelectedRowStyle BackColor="#333333" />
                                <EditRowStyle BackColor="#999999" />
                            </asp:GridView>
                        </div>
                    </div>
                    <br />
                    <asp:Label ID="lMessage" runat="server" Style="" Font-Names="Arial" ForeColor="#990000"></asp:Label>
                    <br />
                    <asp:Label ID="lState" runat="server" Text="lSTATE" Visible="False"></asp:Label>
                    <table cellspacing="5">
                        <tr>
                            <td>
                                <asp:Label ID="lName" runat="server" Text="Név:" Style=""
                                    Visible="False"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbUSR_NAME" runat="server" Style="" CssClass="editbox"
                                    Visible="False"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lLoginName" runat="server" Text="Login:" Style=""
                                    Visible="False"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbUSR_LOGIN_NAME" runat="server" Style="" CssClass="editbox" 
                                    Visible="False"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lPW" runat="server" Text="Jelszó:" Style=""
                                    Visible="False"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbPW" runat="server" Style="" CssClass="editbox" TextMode="Password"
                                    Visible="False"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lPW0" runat="server" Text="Főnök:" Style=""
                                    Visible="False"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlUSR_FONOK" runat="server" Style="" CssClass="other_input"
                                    Visible="False">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:CheckBox ID="cbSupervisor" runat="server" Style="" Text="Supervisor" Enabled="False"
                                Visible="False" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
